package com.ideabove.data;

import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

//1.	cpost_id : 포스트 ID 
//2.	link : 유투브 링크 
//3.	title : 유투브 제목 
//4.	post : 유저가 작성한 내용 
//5.	view_cnt : 유투브 포스트 뷰 카운트 
//6.	genre_id : 장르 ID 
//7.	genre_name : 장르명 
//8.	folder_id : 폴더 ID 


public class PlayItem {
    String cpost_id;	
    String title;		
    String author;		
    String first_name;	 
    String last_name;	
    String link;		
    String duration;	
    String post;		
    String likeCnt;		
    String genre_id;
    String genre_name;
    String lowQualityUrl;
    String highQualityUrl;
    String thumbUrl;
    String viewCnt;
    String folderId;
    String ownerId;
    String userId;
    String isLikeIdx;
    String pUid;
    
        
    List <Comment> comments = new ArrayList<Comment>();
    
    
//    Enumeration<String> enumerationKey = hashtable.keys();
//    while (enumerationKey.hasMoreElements()) {
//        String string = (String) enumerationKey.nextElement();
//        System.out.println(string);
//    }
//   
//    Enumeration<String> enumerationValue = hashtable.elements();
//    while (enumerationValue.hasMoreElements()) {
//        String string = (String) enumerationValue.nextElement();
//        System.out.println(string);
//    }
    public List<Comment> getComments() {
		return comments;
	}
	public void setComments(ArrayList<Comment> comments) {
		this.comments = comments;
	}
    
	public String getpUid() {
		return pUid;
	}
	public void setpUid(String pUid) {
		this.pUid = pUid;
	}
	public String getIsLikeIdx() {
		return isLikeIdx;
	}
	public void setIsLikeIdx(String isLikeIdx) {
		this.isLikeIdx = isLikeIdx;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getOwnerId() {
		return ownerId;
	}
	public void setOwnerId(String ownerId) {
		this.ownerId = ownerId;
	}
	
	public String getThumbUrl() {
		return thumbUrl;
	}
	public void setThumbUrl(String thumbUrl) {
		this.thumbUrl = thumbUrl;
	}
	public String getLowQualityUrl() {
		return lowQualityUrl;
	}
	public void setLowQualityUrl(String lowQualityUrl) {
		this.lowQualityUrl = lowQualityUrl;
	}
	public String getHighQualityUrl() {
		return highQualityUrl;
	}
	
	public String getGenre_name() {
		return genre_name;
	}
	public void setGenre_name(String genre_name) {
		this.genre_name = genre_name;
	}
	public String getViewCnt() {
		
		if(viewCnt == null){
			return "0";
		}
		
		 int inputprice = Integer.parseInt(viewCnt);
		 String price="";
		 NumberFormat nf = NumberFormat.getInstance();
		 nf.setMaximumIntegerDigits(1000000000); //최대수 지정
		 price = nf.format(inputprice);
		
		return price;
	}
	public void setViewCnt(String viewCnt) {
		this.viewCnt = viewCnt;
	}
	public String getFolderId() {
		return folderId;
	}
	public void setFolderId(String folderId) {
		this.folderId = folderId;
	}
	public void setHighQualityUrl(String highQualityUrl) {
		this.highQualityUrl = highQualityUrl;
	}
	public String getCpost_id() {
		return cpost_id;
	}
	
	public void setCpost_id(String cpost_id) {
		this.cpost_id = cpost_id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public String getFirst_name() {
		return first_name;
	}
	public void setFirst_name(String first_name) {
		this.first_name = first_name;
	}
	public String getLast_name() {
		return last_name;
	}
	public void setLast_name(String last_name) {
		this.last_name = last_name;
	}
	public String getLink() {
		return link;
	}
	public void setLink(String link) {
		this.link = link;
	}
	public String getDuration() {
		return duration;
	}
	public void setDuration(String duration) {
		this.duration = duration;
	}
	public String getPost() {
		return post;
	}
	public void setPost(String post) {
		this.post = post;
	}
	public String getLikeCnt() {
		return likeCnt;
	}
	public void setLikeCnt(String likeCnt) {
		this.likeCnt = likeCnt;
	}
	public String getGenre_id() {
		return genre_id;
	}
	public void setGenre_id(String genre_id) {
		this.genre_id = genre_id;
	}
    
    
}
